import { http } from '@/utils/http/axios';

/**
* @description: 业务流程列表
*/
export function page(params) {
    return http.request({
        url: '/moss-cloud-base/base/flowBusiness/page',
        method: 'POST',
        data: params,
    });
}

/**
* @description: 保存业务流程
*/
export function save(params) {
    return http.request({
        url: '/moss-cloud-base/base/flowBusiness/save',
        method: 'POST',
        data: params,
    }, {
        isTransformResponse: false,
    });
}

/**
* @description: 修改业务流程
*/
export function update(params) {
    return http.request({
        url: '/moss-cloud-base/base/flowBusiness/update',
        method: 'POST',
        data: params,
    }, {
        isTransformResponse: false,
    });
}

/**
* @description: 删除业务流程
*/
export function remove(params) {
    return http.request({
        url: '/moss-cloud-base/base/flowBusiness/remove',
        method: 'POST',
        data: params,
    }, {
        isTransformResponse: false,
    });
}

/**
* @description: 业务流程详情
*/
export function detail(params) {
    return http.request({
        url: '/moss-cloud-base/base/flowBusiness/detail',
        method: 'POST',
        data: params,
    }, {
        isTransformResponse: false,
    });
}
/**
 * 流程任务列表
 * @param params 
 * @returns 
 */
export function nodeTasks(params) {
    return http.request({
        url: '/moss-cloud-base/base/flowBusiness/nodeTasks',
        method: 'POST',
        data: params,
    });
}

/**
* @description: 业务流程审批
*/
export function approval(params) {
    return http.request({
        url: '/moss-cloud-base/base/flowBusiness/approval',
        method: 'POST',
        data: params,
    }, {
        isTransformResponse: false,
    });
}